#ifndef FLIT_H
#define FLIT_H 

#define FLIT_POOL_SZ 2000000L

typedef enum {READY, PENDING, UNREGISTERED} flit_type; 

typedef struct flit
{ 
  unsigned int flit_num;
  flit_type    type;
  unsigned int inj_tm; 
  unsigned int ejt_tm; 
  double       flit_delay;
  unsigned int snode; 
  unsigned int dnode;

  struct flit  *next; 
} flit_t; 

flit_t *flit_alloc(void); 
void   flit_free(flit_t **flit_ptr); 
void   init_flit_pool(void); 

#endif
